import React, { Component } from 'react';
import { MessageOutline } from 'antd-mobile-icons'
import { withRouter } from 'react-router-dom'
// 导入css文件
import '../../styles/index/Input.css'
class Input extends Component {
    // 去到搜索页
    toSearch() {
        this.props.history.push({ pathname: '/search' })
    }
    render() {
        return (
            <div className='input-box'>
                <input type="text" placeholder='搜索商品' onClick={() => { this.toSearch() }} />
                <span className='serv'>
                    <span><MessageOutline /></span>
                    <span>客服</span>
                </span>
            </div>
        );
    }
}

export default withRouter(Input);